package com.zhijian.medical.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 脱水流程
 *
 * @author HCG
 * @version 1.0
 * @date 2022/9/13
 */
@AllArgsConstructor
@Getter
public enum RoutineTsEnum {

    // 0-流程结束；1-10% 甲醛；2-80% 乙醇；3-95% 乙醇①；4-95% 乙醇②；5-无水乙醇①；6-无水乙醇②；
    // 7-二甲苯①；8-二甲苯②；9-石蜡①；10-石蜡②；11-石蜡③；
    OVER(0, "流程结束"),

    JQ(1, "10% 甲醛"),
    YC(2, "80% 乙醇"),
    YC_ONE(3, "95% 乙醇①"),
    YC_TWO(4, "95% 乙醇②"),
    WSYC_ONE(5, "无水乙醇①"),

    WSYC_TWO(6, "无水乙醇②"),
    EJB_ONE(7, "二甲苯①"),
    EJB_TWO(8, "二甲苯②"),
    SL_ONE(9, "石蜡①"),
    SL_TWO(10, "石蜡②"),

    SL_THREE(11, "石蜡③");

    private Integer code;
    private String desc;

    public static RoutineTsEnum getByCode(Integer code) {
        RoutineTsEnum[] values = RoutineTsEnum.values();
        for (RoutineTsEnum anEnum : values) {
            if (anEnum.getCode().equals(code)) {
                return anEnum;
            }
        }
        return null;
    }
}
